<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

<ui:composition template="/WEB-INF/templates/BasicTemplate.xhtml">

	<ui:define name="content">
		<c:set target="#{userBean}" property="action" value="BROWSE_CART" />

		<h:dataTable value="#{sessionScope['tickets']}" var="game"
			bgcolor="#F1F1F1" border="2" width="60%"
			rendered="#{userBean.permissions}">

			<h:column>
				<f:facet name="header">Ticket id</f:facet>
				<h:outputText value="#{game.id}" />
			</h:column>
			<h:column>
				<f:facet name="header">Team A</f:facet>
				<h:outputText value="#{game.gameBean.teamA}" />
			</h:column>
			<h:column>
				<f:facet name="header">Team B</f:facet>
				<h:outputText value="#{game.gameBean.teamB}" />
			</h:column>
			<h:column>
				<f:facet name="header">Date</f:facet>
				<h:outputText value="#{game.game.gameDate}" />
			</h:column>
			<h:column>
				<f:facet name="header">Time</f:facet>
				<h:outputText value="#{game.game.gameTime}" />
			</h:column>
			<h:column>
				<f:facet name="header">Stadium</f:facet>
				<h:outputText value="#{game.game.stadiumName}" />
			</h:column>
			<h:column>
				<f:facet name="header">City</f:facet>
				<h:outputText value="#{game.game.stadiumCity}" />
			</h:column>
			<h:column>
				<f:facet name="header">Sector</f:facet>
				<h:outputText value="#{game.sector}" />
			</h:column>

		</h:dataTable>

		<h:outputLabel value="You don't have permission to this page"
			rendered="#{!userBean.permissions}" />
	</ui:define>
</ui:composition>
</html>